home *** CD-ROM | disk | FTP | other *** search
/ Aminet 3 / Aminet 3 - July 1994.iso / Aminet / util / misc / UserTool1_0.lha / UserTool / Source / parse.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-01-21  |  1.2 KB  |  48 lines

  1. /*
  2.  * UserTool - A Tool for managing users in a MuFS environment.
  3.  *
  4.  * $VER: parse.h 37.1 (10.1.94)
  5.  */
  6.  
  7. #ifndef EXEC_LISTS_H
  8. #include <exec/lists.h>
  9. #endif /* EXEC_LISTS_H */
  10. #ifndef _STDIO_H
  11. #include <stdio.h>
  12. #endif /* _STDIO_H */
  13. #ifndef LIBRARIES_MULTIUSER_H
  14. #include <libraries/multiuser.h>
  15. #endif /* LIBRARIES_MULTIUSER_H */
  16.  
  17. typedef struct _UserStruct {
  18.     struct Node us_Node;
  19.     UWORD us_NodePad; /* This long word aligns the start of us_UserName */
  20.     struct List us_Groups;
  21.     UBYTE us_UserName[muUSERIDSIZE];
  22.     UBYTE us_Password[32];
  23.     ULONG us_UserID;
  24.     ULONG us_GroupID;
  25.     UBYTE us_RealName[muUSERNAMESIZE];
  26.     UBYTE us_HomeDir[muHOMEDIRSIZE];
  27.     UBYTE us_Port[32];
  28. } UserStruct;
  29.  
  30. typedef struct _GroupStruct {
  31.     struct Node gs_Node;
  32.     UWORD gs_NodePad; /* This long word aligns the start of us_UserName */
  33.     UBYTE gs_GroupID[muGROUPIDSIZE];
  34.     ULONG gs_GID;
  35.     ULONG gs_MgrID;
  36.     UBYTE gs_Name[muGROUPNAMESIZE];
  37. } GroupStruct;
  38.  
  39. VOID FreeUserList( struct List * );
  40. VOID FreeGroupList( struct List * );
  41. struct List *ParsePasswdFile( VOID );
  42. struct List *ParseGroupFile( VOID );
  43. VOID WritePasswdFile( UserStruct * );
  44. LONG AddGroupToUser( LONG, LONG );
  45. LONG RemoveGroupFromUser( LONG, LONG );
  46. UserStruct *UserWithID( LONG );
  47. VOID WriteGroupFile( VOID );
  48.